import request from '@/utils/request'

//添加商品到购物车
export const addToShoppingCarService = (data: any) => {
    return request.post('/ShoppingCar/addGoods', data);
}

//获取购物车的信息
export const getShoppingCarInfoService = () => {
    return request.get('/ShoppingCar/gotData');
}

//更新购物车的信息
export const updateShoppingCarService = (params: any) => {
    return request.post('/ShoppingCar/updateShoppingCar', params);
}

//删除购物车的商品
export const deleteShoppingCarGoodsService = (params: any) => {
    const paramsObject = Object.fromEntries(params);
    return request.post('/ShoppingCar/deleteGoods', paramsObject);
}